#!/bin/bash
cd `dirname $0`
CURRENT_DIR=`pwd`
FILENAME=`date +web-api-1.0.war.%Y%m%d_%H%M%S`
cd $CURRENT_DIR
echo "packaging java"
gradle clean
gradle -x test :web-api:war
echo "upload to $FILENAME"
scp -P 19922 $CURRENT_DIR/web-api/build/libs/web-api-1.0.war root@my-data.online:/root/application/game_server/upload/$FILENAME
